#!/bin/bash
#
#************************
#Author:          lixu666
#mail:          1239813177@qq.com
#Date:          2020-01-12
#FileName:          viewHardware.sh
#Description:          test script
#Copyright:          2020
#************************
echo "========================================================================="
echo "内存相关信息："
echo "========================================================================="
dmidecode|grep -P "Maximum\s+Capacity"
dmidecode | grep  -P  -A5  "Memory\s+Device" | grep Size | grep -v Range
dmidecode | grep -A16 "Memory Device" | grep "Speed"

echo "========================================================================="
echo "查看内存槽数及大小："
echo "========================================================================="

echo "========================================================================="
echo "查看内存频率:"
echo "========================================================================="


echo "========================================================================="
echo "查看详细的主板信息: "
echo "========================================================================="

echo "========================================================================="
echo "查看硬盘信息: "
echo "========================================================================="
smartctl -a /dev/sda | tail -n +5 | head -n 14    #第五行开始，前十四行
